import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class MainApp {
    public static void main(String[] args) {
        ApplicationContext context = new FileSystemXmlApplicationContext
                ("Beans.xml");
        HelloWorld obj = (HelloWorld) context.getBean("helloWorld");
        obj.setMessage("吃了没您？");
        obj.getMessage();
        HelloWorld obj2 = (HelloWorld) context.getBean("helloWorld");
        obj2.getMessage();

    }
}
